var simuTableWithConsole;

function simuReport(text) {
    console.log(text);
}

function init_simu_table_reporting() {
    simuTableWithConsole = new TableWithConsole('#table_simu', '#console');
    simuTableWithConsole.initTable([
        {"sTitle": "Id"},
        {"sTitle": "Reference"},
        {"sTitle": "Lat"},
        {"sTitle": "Lng"},
        {"sTitle": "Abonnement"},
        {"sTitle": "Etat"},
    ], function(data){
        $('#smartlockId').html(data[0]);
        $('#smartlockRef').val(data[1]);
        $('#smartlockLat').val(data[2]);
        $('#smartlockLng').val(data[3]);
        $('#smartlockAbo').val(data[4]);
        $('#smartlockActif').val(data[5]);
    }); 
}

function load_simu_table_reporting() {
    var t = [];
    for (var i = 0; i < this.length; i++) {
        var tmp = [];
        var elt = this[i];
        tmp.push(elt.id);
        tmp.push(elt.reference);
        tmp.push(elt.lat);
        tmp.push(elt.lng);
        tmp.push(elt.abonnement);
        tmp.push(elt.actif);
        t.push(tmp);
    }
    simuTableWithConsole.loadTable(t);
}



